package com.chen.controller;

import com.chen.service.UserService;
import com.chen.utils.Result;
import com.chen.vo.LoginParams;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/web")
public class WebLogin {

    @Resource
    UserService userService;


    @PostMapping("/login")
    public Result webLogin(@RequestBody LoginParams loginParams){
        return userService.webLogin(loginParams);
    }

    @PostMapping("/register")
    public Result webRegister(@RequestBody LoginParams loginParams){
        return userService.webRegister(loginParams);
    }


}
